#pragma once
#include <cstdint>
#include "dxrTypes.h"
#ifdef _WIN32
#define dxrAPI extern "C" __declspec(dllexport)
#else
#define dxrAPI extern "C"
#endif



dxrAPI void dxrInitSystem();
dxrAPI void dxrUnInitSystem();
dxrAPI MeshData* dxrCreateMesh();
dxrAPI void dxrUpdateCPUMesh(MeshData* pMesh, CPUResourcePtr vb, CPUResourcePtr ib, int vertex_stride, int vertex_count, 
	int vertex_offset, int index_stride, int index_count, int index_offset);
dxrAPI void dxrUpdateGPUMesh(MeshData* pMesh, GPUResourcePtr vb, GPUResourcePtr ib, int vertex_stride, int vertex_count,
	int vertex_offset, int index_stride, int index_count, int index_offset);
dxrAPI InstanceData* dxrCreateInstance(MeshData* mesh);
dxrAPI void dxrUpdateInstanceTransform(InstanceData* pInstance, float4x4 transform);
dxrAPI void dxrCreateCamera();
dxrAPI void dxrUpdateCameraTransform(float3 pos, float4x4 view, float4x4 proj);
dxrAPI LightData* dxrCreateLight();
dxrAPI void dxrUpdateLight(LightData* pLight, float3 dir);
dxrAPI void dxrCreateRenderTarget();
dxrAPI void dxrUpdateRenderTarget(GPUResourcePtr hostBuffer, int w, int h, RenderTargetFormat fmt);
dxrAPI bool dxrRemoveMesh(MeshData* pMesh);
dxrAPI bool dxrRemoveInstance(InstanceData* pInstance);
dxrAPI bool dxrRemoveCamera();
dxrAPI bool dxrRemoveLight(LightData* pLight);
dxrAPI bool dxrRemoveRenderTarget();
dxrAPI bool dxrRender();